#include <iostream>
#include <QCoreApplication>
#include "listenthread.h"
using namespace std;

int main(int argc, char *argv[]){
    QCoreApplication a(argc, argv);
    ChatDbHandler db;

    db.SetDbPath("Chat.db");
    db.OpenDb();
    db.CreateUSER();

    ListenThread *listen_thread = new ListenThread(&db);
    listen_thread->start();
    a.exec();
    db.CloseDb();
    return 0;
}
